package com.zmx.doctor.adapter;

import android.app.Activity;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.wang.adapters.adapter.BaseAdapterRvList;
import com.wang.adapters.base.BaseViewHolder;
import com.zmx.doctor.R;
import com.zmx.doctor.pojo.DepartmentCategory;

import butterknife.BindView;
import butterknife.ButterKnife;

public class DepartmentRightItemApadter extends BaseAdapterRvList<DepartmentRightItemApadter.ViewHolder, DepartmentCategory> {

    public int position = -1;

    public DepartmentRightItemApadter(Activity activity) {
        super(activity);
    }

    @Override
    protected void onBindVH(ViewHolder holder, int listPosition, DepartmentCategory s) {

        holder.textname.setText(s.getName());

        Log.e("position","position="+position);


    }

    @NonNull
    @Override
    protected ViewHolder onCreateVH(ViewGroup parent, LayoutInflater inflater) {

        DepartmentRightItemApadter.ViewHolder holder = new DepartmentRightItemApadter.ViewHolder(inflater.inflate(R.layout.apadter_department_right_item, parent, false));
        return holder;

    }

    static class ViewHolder extends BaseViewHolder {

        @BindView(R.id.textname)
        TextView textname;

        ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

    }

}
